home *** CD-ROM | disk | FTP | other *** search
- Path: gabi-soft.fr!not-for-mail
- From: kanze@gabi-soft.fr (J. Kanze)
- Newsgroups: comp.std.c
- Subject: Re: ... char * * promotion to char const * const * ...
- Date: 18 Jan 1996 17:15:33 +0100
- Organization: GABI Software, Sarl.
- Message-ID: <4dlrn5$81e@gabi.gabi-soft.fr>
- References: <4dgj8q$qin@unix.sri.com> <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de> <DLBzGB.J60@polo.demon.co.uk>
- NNTP-Posting-Host: gabi.gabi-soft.fr
- X-Newsreader: TIN [version 1.2 PL2]
-
- John Winters (john@polo.demon.co.uk) wrote:
- |> In article <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>,
- |> James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
- |> [snip]
- |> >
- |> >Originally, the C standard was going to allow this; in fact, it was
- |> >going to allow all casts which added const anywhere in the type. Then
- |> >someone pointed out that the conversion 'char ** -> char *const *' was
- |> >unsafe. As a result, the wording was changed to only allow adding the
- |> >const at the top level.
-
- |> Interesting. Could you enlighten us (well, me anyway) as to *why* it
- |> is unsafe. I don't find it immediately obvious.
-
- As another poster has already pointed out, I gave the wrong conversion
- as unsafe. (That's what comes of typing faster than you think.)
- --
- James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
- GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
- Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
- -- A la recherche d'une activitΘ dans une region francophone
-